package com.pituruh.tjroute;

import android.app.Activity;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.GradientDrawable.Orientation;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;

public class Login extends Activity {
	/** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.login);
        
        Resources res = getResources();
        int colors[] =  {res.getColor(R.color.actionbar_color_1),res.getColor(R.color.actionbar_color_2)};
        GradientDrawable grad = new GradientDrawable(Orientation.TOP_BOTTOM,colors);
        LinearLayout layout = (LinearLayout) findViewById(R.id.buttonlayout);
        layout.setBackgroundDrawable(grad);
        
        TextView title_bar = (TextView) findViewById(R.id.title_bar);
        title_bar.setText(R.string.login);
    }
    
    public void onHomeClick(View v) {
    	startActivity(new Intent(Login.this, TJRoute.class));
    }

    public void onSearchClick(View v) {
    	startActivity(new Intent(Login.this, FindRoute.class));
    }

    public void onLoginClick(View v) {
    	Toast.makeText(getApplicationContext(), "login", Toast.LENGTH_SHORT).show();
    }

    public void onCancelClick(View v) {
    	startActivity(new Intent(Login.this, TJRoute.class));
    }
}
